<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<html> 
	<head>
		<title>Send Letter</title>
        <link href="form/login.css" rel="stylesheet" type="text/css">
	</head>
	<body>
		<logic:notPresent name="userid" scope="session">
           	<logic:redirect forward="login_error"></logic:redirect>
		</logic:notPresent>
		<logic:present name="admin" scope="session">
			<logic:redirect forward="illegal_access"></logic:redirect>
		</logic:present>
		<logic:present name="ban" scope="session">
			<logic:redirect forward="ban_error"></logic:redirect>
		</logic:present>
    	<div class="container">
			<div class="header">
				<html:img page="/yssz.jpg"/>
			</div>
			<div class="content">
                <h1>Send Letter</h1>
                <p>
                    <html:link action="viewTo">letters I received</html:link>
					<html:link action="viewFrom">letters I sent</html:link>
					<html:link page="/view_letter.jsp">letter center</html:link>
                    <html:form action="/sendLetter">
						to : <html:select property="to">
							<html:options collection="users" property="userid" labelProperty="name"/>
						</html:select><html:errors property="to"/><br/>
						content : <html:textarea property="content"/><html:errors property="content"/><br/>
						<html:submit/><html:cancel/>
					</html:form>
				</p>
			</div>
			<div class="footer">
				<p>copyright@yssz</p>
			</div>
		</div>   
	</body>
</html>